package com.lagou.edu.bean;

import lombok.Data;
import lombok.ToString;

/**
 * @program: springcloud-web-one
 * @description: 邮件发送结果
 * @author: zhoushiduo
 * @create: 2021-03-22 15:30
 */

@Data
public class MailReturn {

    /**
     * 成功标志
     */
    private boolean success = true;

    /**
     * 返回信息
     */
    private String message;


    /**
     * 接受人
     */
    private String[] tos;

    public void buildSuccess(String[] tos ,String message){
        this.success = true;
        this.tos = tos;
        this.message = message;
    }

    public void buildFailure(String message){
        this.success = false;
        this.message = message;
    }

}
